<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="__assets__/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="__assets__/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="__assets__/js/echarts.min.js"></script>
    <script src="__assets__/js/echarts.min.js"></script>
    <link rel="stylesheet" href="__assets__/css/amazeui.min.css" />
    <link rel="stylesheet" href="__assets__/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="__assets__/css/app.css">
    <link href="__assets__/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="__assets__/css/bootstrap-select.css" rel="stylesheet" type="text/css">
    <link href="__assets__/css/bootstrap-switch.min.css" rel="stylesheet">
    <link href="__assets__/css/style.css" rel="stylesheet" type="text/css">
    <link href="__assets__/css/user.css" rel="stylesheet" type="text/css">
    <link href="__assets__/css/artboard-base.css" rel="stylesheet" type="text/css">
    <link href="__assets__/css/common.css" rel="stylesheet" type="text/css">
    <script src="__assets__/js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
//          $('input').customInput();
            $('.toggle').each(function(){
                $('div:first',this).addClass('first');
                $('div:last',this).addClass('last');
            });
        });
    </script>
    <script>
        $(function(){
            $(".quentin-head").hover(function(){
                $(this).children(".quentin-ul").stop().slideToggle()
            },function(){
                $(this).children(".quentin-ul").stop().slideToggle()
            })
            $(".quentin-li").hover(function(){
                $(this).children("ul").stop().slideToggle()
                $(this).children("ul").find("a").css({
                    "color" : "#343434"
                })
            },function(){
                $(this).children("ul").stop().slideToggle()
                $(this).children("ul").find("a").css({
                    "color" : "#343434"
                })
            })
        })

    </script>

</head>

<body data-type="index">
<script src="__assets__/js/theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <header>
        <!-- logo -->
        <div class="am-fl tpl-header-logo">
            <a href="{:U('user/member')}"><img src="__assets__/img/logo.png" alt=""></a>
        </div>
        <!-- 右侧内容 -->
        <div class="tpl-header-fluid">
            <!-- 侧边切换 -->
            <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span>

                </span>
            </div>
            <!-- 搜索 -->
            <div class="am-fl tpl-header-search">
                <form class="tpl-header-search-form" action="javascript:;">
                    <button class="tpl-header-search-btn am-icon-search"></button>
                    <input class="tpl-header-search-box" type="text" placeholder="搜索内容...">
                </form>
            </div>
            <!-- 其它功能-->
            <div class="am-fr tpl-header-navbar">
                <ul>
                    <!-- 欢迎语 -->
                    <li class="am-text-sm tpl-header-navbar-welcome">
                        <a href="javascript:;">欢迎你, <span>{$user['username']}</span> </a>
                    </li>

                    <!-- 新邮件 -->
                    <li class="am-dropdown tpl-dropdown" data-am-dropdown>
                        <a href="javascript:;" class="am-dropdown-toggle tpl-dropdown-toggle" data-am-dropdown-toggle>
                            <i class="am-icon-envelope"></i>
                            <span class="am-badge am-badge-success am-round item-feed-badge">4</span>
                        </a>
                        <!-- 弹出列表 -->
                        <ul class="am-dropdown-content tpl-dropdown-content">
                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <div class="menu-messages-ico">
                                        <img src="__assets__/img/user04.png" alt="">
                                    </div>
                                    <div class="menu-messages-time">
                                        3小时前
                                    </div>
                                    <div class="menu-messages-content">
                                        <div class="menu-messages-content-title">
                                            <i class="am-icon-circle-o am-text-success"></i>
                                            <span>夕风色</span>
                                        </div>
                                        <div class="am-text-truncate"> Amaze UI 的诞生，依托于 GitHub 及其他技术社区上一些优秀的资源；Amaze UI 的成长，则离不开用户的支持。 </div>
                                        <div class="menu-messages-content-time">2016-09-21 下午 16:40</div>
                                    </div>
                                </a>
                            </li>

                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <div class="menu-messages-ico">
                                        <img src="__assets__/img/user02.png" alt="">
                                    </div>
                                    <div class="menu-messages-time">
                                        5天前
                                    </div>
                                    <div class="menu-messages-content">
                                        <div class="menu-messages-content-title">
                                            <i class="am-icon-circle-o am-text-warning"></i>
                                            <span>{$user.username}</span>
                                        </div>
                                        <div class="am-text-truncate"> 为了能最准确的传达所描述的问题， 建议你在反馈时附上演示，方便我们理解。 </div>
                                        <div class="menu-messages-content-time">2016-09-16 上午 09:23</div>
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <i class="am-icon-circle-o"></i> 进入列表…
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- 新提示 -->
                    <li class="am-dropdown" data-am-dropdown>
                        <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                            <i class="am-icon-bell"></i>
                            <span class="am-badge am-badge-warning am-round item-feed-badge">5</span>
                        </a>

                        <!-- 弹出列表 -->
                        <ul class="am-dropdown-content tpl-dropdown-content">
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-line-chart"></i>
                                        <span> 有6笔新的销售订单</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        12分钟前
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-star"></i>
                                        <span> 有3个来自人事部的消息</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        30分钟前
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-folder-o"></i>
                                        <span> 上午开会记录存档</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        1天前
                                    </div>
                                </a>
                            </li>


                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <i class="am-icon-bell"></i> 进入列表…
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- 退出 -->
                    <li class="am-text-sm">
                        <a href="javascript:;">
                            <span class="am-icon-sign-out"></span> 退出
                        </a>
                    </li>
                </ul>
            </div>
        </div>

    </header>
    <!-- 风格切换 -->
    <div class="tpl-skiner">
        <div class="tpl-skiner-toggle am-icon-cog">
        </div>
        <div class="tpl-skiner-content">
            <div class="tpl-skiner-content-title">
                选择主题
            </div>
            <div class="tpl-skiner-content-bar">
                <span class="skiner-color skiner-white" data-color="theme-white"></span>
                <span class="skiner-color skiner-black" data-color="theme-black"></span>
            </div>
        </div>
    </div>
    <!-- 侧边导航栏 -->
    <div class="left-sidebar">
        <!-- 菜单 -->
        <ul class="sidebar-nav">
            <li class="sidebar-nav-heading"><i class="am-icon-cubes sidebar-nav-link-logo"></i>项目</li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/project')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 项目大厅
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/myproject')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 我的项目
                </a>
            </li>
            <li class="sidebar-nav-heading"><i class="am-icon-eye sidebar-nav-link-logo"></i>漏洞</li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/mybugs')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 我的漏洞
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/subbug')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 提交漏洞
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/myfav')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 我的收藏
                </a>
            </li>
            <li class="sidebar-nav-heading"><i class="am-icon-group sidebar-nav-link-logo"></i>团队</li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/myteam')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 我的团队
                </a>
            </li>
            <li class="sidebar-nav-heading"><i class="am-icon-wrench sidebar-nav-link-logo"></i>账户设置</li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/myintro')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 基本资料
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/firm')}" class="actived">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 厂商认证
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/crash')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 资金账户
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/bindphone')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 手机绑定
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/weixin')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 微信绑定
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:U('user/amend')}">
                    <i class="am-icon-angle-right sidebar-nav-link-logo"></i> 密码修改
                </a>
            </li>
        </ul>
    </div>


    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="user_rightmain">
            <div class="inner">
                <div class="user-main">
                    <div class="panel panel-default mybugs">
                        <div class="tit06">
                            <h3>个人设置</h3>
                        </div>
                        <div class="tab-bugs">
                            <div class="tab-bugs">
                                <div class="btn-group tab-wraper02">
                                    <a class="btn btn-default" href="{:U('user/myintro')}">
                                        基本信息 </a>
                                    <a class="btn btn-default active" href="{:U('user/firm')}">
                                        厂商认证 </a>
                                    <a class="btn btn-default" href="{:U('user/crash')}" id="fundingAcco">
                                        资金账户 </a>
                                    <a class="btn btn-default" href="{:U('user/bindphone')}">
                                        手机绑定 </a>
                                    <a class="btn btn-default" href="{:U('user/weixin')}">
                                        微信绑定 </a>
                                    <a class="btn btn-default" href="{:U('user/amend')}">
                                        修改密码 </a>
                                </div>
                            </div>
                        </div>
                        <div class="setup-wraper setup-form">
                            <form class="form-level" role="form"  id="identityform" method="post">
                                <input name="Token" type="hidden" value="18b79111">
                                <div class="form-row clear">
                                    <label for="name" class="label-text"><span class="star">* </span>厂商名称</label>
                                    <div class="form-ipt-info show-error-p0">
                                        <input type="text" class="form-control" name="name" value="" placeholder="请输入厂商名称" required="">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="hpmepage" class="label-text"><span class="star">* </span>官方主页</label>
                                    <div class="form-ipt-info show-error-p1">
                                        <input type="text" class="form-control" name="url" placeholder="请输入官方主页" required="">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="domainname" class="label-text"><span class="star">* </span>旗下域名</label>
                                    <div class="form-ipt-info show-error-p2">
                  <textarea class="form-control" name="domain" rows="3" placeholder="请输入您的网站（支持多个主域），例如：
http://www.vulbox.com
http://www.freebuf.com" required=""></textarea>
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="trade" class="label-text"><span class="star">* </span>所属行业</label>
                                    <div class="form-ipt-info show-error-p3">
                                        <input type="text" class="form-control" name="trade" placeholder="请输入所属行业" required="">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="contacts" class="label-text"><span class="star">* </span>联系人</label>
                                    <div class="form-ipt-info show-error-p3">
                                        <input type="text" class="form-control" name="linkman" placeholder="请输入联系人" required="">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="phonenum" class="label-text"><span class="star">* </span>手机号</label>
                                    <div class="form-ipt-info show-error-p4">
                                        <input type="text" class="form-control" name="tel" placeholder="请输入手机号" maxlength="11" required="">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="code" class="label-text"><span class="star">* </span>输入验证码</label>
                                    <div class="form-ipt-info show-error-p5">
                                        <span class="code-ipt"><input type="text" required="" name="code" data-toggle="tooltip" data-tip-class="tooltip-info" title="请输入验证码" class="form-control" placeholder="请输入验证码"></span><span class="tel-btn"><button type="button" class="btn phone_code_send">发送验证码</button></span> <p style="display: none"  class="ts">手机号不可为空</p>
                                    </div>
                                </div>

                                <script>
                                    $('.phone_code_send').click(function(event) {
                                        var phone= $('input[name=tel]').val();
                                        if(phone==''){
                                            $('.ts').show();
                                            setTimeout(function() {$('.ts').hide();}, 2000);
                                            return false;
                                        }
                                        enable = false;
                                        $.ajax({
                                            url: '{:U("user/firm_find")}',
                                            dataType: 'json',
                                            cache: false,
                                            data: {phone: phone},
                                            success: function(data) {
                                                if(data.status != 0) {
                                                    alert(data.message);
                                                    return;
                                                }
                                                var num = 30;
                                                var interval = window.setInterval(function() {
                                                    $('.phone_code_send').html(--num + 's 重发送');
                                                    if(num == 0) {
                                                        enable = true;
                                                        window.clearInterval(interval);
                                                        $('.phone_code_send').html('重发送');
                                                    }
                                                }, 1000);
                                            },
                                            error: function(xhr, status, error) {
                                                console.log(xhr);
                                                console.log(status);
                                                console.log(error);
                                            }
                                        });

                                    });
                                </script>

                                <div class="form-row clear">
                                    <label for="department" class="label-text"><span class="star">* </span>所属部门</label>
                                    <div class="form-ipt-info show-error-p6">
                                        <input type="text" class="form-control" name="section" placeholder="请输入所属部门" required="">
                                        <input type="hidden" name="email" value="{$user['email']}">
                                        <input type="hidden" name="user_id" value="{$user['id']}">
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <label for="email" class="label-text"><span class="star">* </span>企业邮箱</label>
                                    <div class="form-ipt-info">
                                        <fieldset disabled=""><input type="text" name="email" id="email" class="form-control" value="{$user['email']}" placeholder="{$user['email']}"></fieldset>
                                        <p class="tips-text01 color-red">注册邮箱如果非企业邮箱，验证将不通过，是否重新<a href="https://account.tophant.com/register/vulbox.html" target="_blank" class="text-primary">注册</a></p>
                                    </div>
                                </div>
                                <div class="form-row clear">
                                    <div class="label-text"></div>
                                    <div class="form-ipt-info bnt-identity">
                                        <input type="button" class="btn btn-primary btn-block" onclick="onRegisterClick()" value="提交验证信息">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
<script src="__assets__/js/amazeui.min.js"></script>
<script src="__assets__/js/amazeui.datatables.min.js"></script>
<script src="__assets__/js/dataTables.responsive.min.js"></script>
<script src="__assets__/js/app.js"></script>
<script>
    function onRegisterClick() {

        /*var name = $('input[name=name]').val();
        var hpmepage = $('input[name=hpmepage]').val();
        var domainname = $('input[name=domainname]').val();
        var trade = $('input[name=trade]').val();
        var contacts = $('input[name=contacts]').val();
        var code = $('input[name=code]').val();
        var department = $('input[name=department]').val();
        var phonenum = $('input[name=phonenum]').val();
        var email=$('#email').attr('placeholder');*/
        $.ajax({

            type: "POST",
            url: '{:U("user/firm_add")}',
            dataType:'json',
            cache: false,
            data:$('#identityform').serialize(),
            success:function(data) {
                console.log(data);
                if(data.status = 0) {
                    alert(data.info);
                    return;
                }else {
                    alert(data.info);
                    return;
                }
/*                  setTimeout(function(){
                        location.href='{:U("user/firm")}';
                    },2000);*/
            },
            error: function(xhr, status, error) {
                console.log(xhr);
                console.log(status);
                console.log(error);
            }
        });
    }
</script>
</body>

</html>